/*    */ package com.create.prototype.serialization;
/*    */ 
/*    */ import java.io.ByteArrayInputStream;
/*    */ import java.io.ByteArrayOutputStream;
/*    */ import java.io.ObjectInputStream;
/*    */ import java.io.ObjectOutputStream;
/*    */ import java.io.Serializable;
/*    */ 
/*    */ public class Person
/*    */   implements Serializable
/*    */ {
/*    */   private static final long serialVersionUID = 7847541626222541557L;
/*    */   private String name;
/*    */   private Address address;
/*    */ 
/*    */   public Person(String name, Address address)
/*    */   {
/* 19 */     this.name = name;
/* 20 */     this.address = address;
/*    */   }
/*    */   public String getName() {
/* 23 */     return this.name;
/*    */   }
/*    */   public void setName(String name) {
/* 26 */     this.name = name;
/*    */   }
/*    */   public Address getAddress() {
/* 29 */     return this.address;
/*    */   }
/*    */   public void setAddress(Address address) {
/* 32 */     this.address = address;
/*    */   }
/*    */ 
/*    */   public Person deepClone() throws Exception
/*    */   {
/* 37 */     ByteArrayOutputStream bao = new ByteArrayOutputStream();
/* 38 */     ObjectOutputStream oos = new ObjectOutputStream(bao);
/* 39 */     oos.writeObject(this);
/*    */ 
/* 41 */     ByteArrayInputStream bis = new ByteArrayInputStream(bao.toByteArray());
/* 42 */     ObjectInputStream ois = new ObjectInputStream(bis);
/* 43 */     return (Person)ois.readObject();
/*    */   }
/*    */ 
/*    */   public String toString()
/*    */   {
/* 48 */     return "Person [name=" + this.name + ",city=" + this.address.getCity() + ",street=" + this.address.getStreet() + "]";
/*    */   }
/*    */ }

/* Location:           C:\Users\lenovo\Desktop\DesignMode.jar
 * Qualified Name:     com.create.prototype.serialization.Person
 * JD-Core Version:    0.6.2
 */